﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using StuMngWx.Entities;
using StuMngWx.Dals;

namespace StuMngWx
{
    public partial class FormStuView : Form
    {
        public FormStuView()
        {
            InitializeComponent();
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            List<Student> students = Dal4Student.SearchAllStudents();
            gvStudents.DataSource = students;
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            FormAddStudent formAddStu = new FormAddStudent();
            formAddStu.ShowDialog();
        }
    }
}
